package host

import (
	"net/http"
)

func NewQueryHostRequestFromHTTP(r *http.Request) *QueryHostRequest {
	qs := r.URL.Query()

	id := qs.Get("id")
	name := qs.Get("name")
	ip := qs.Get("ip")

	return &QueryHostRequest{id, name, ip}
}

type QueryHostRequest struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Ip   string `json:"ip,omitempty"`
}
